package com.kgc.itrip.dao;

import com.kgc.itrip.common.Page;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;

import java.io.IOException;
import java.util.List;

/**
 * solr搜索的数据访问层*/
public interface SolrDao<T> {
    /**
     * 根据条件在solr中实现分页查询
     * */
    Page<T> searchByCondition(String coreName,SolrQuery solrQuery,Integer pageNo,Integer size,Class clazz) throws IOException, SolrServerException;
    /**
     * 根据条件在solr中查询前几条数据
     * */
    List<T> listQuery(String coreName, SolrQuery solrQuery, Integer size, Class clazz) throws IOException, SolrServerException;
}
